package com.beyond.trace.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;

/**
 * 农事记录信息对象 t_trace_plant_record
 * 
 * @author yao
 * @date 2022-03-02
 */
@Data
@TableName("t_trace_plant_record")
public class TracePlantRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "record_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long recordId;

    @Excel(name = "基地ID")
    @ApiModelProperty(value = "基地ID")
    @NotEmpty(message = "基地不能为空")
    private String baseId;

    @Excel(name = "地块ID")
    @ApiModelProperty(value = "地块ID")
    @NotEmpty(message = "地块不能为空")
    private String landId;

    /** 产品 */
    @Excel(name = "产品")
    @ApiModelProperty(value = "产品")
    @NotEmpty(message = "产品不能为空")
    private String recordProduct;

    /** 消耗品，0表示不使用消耗品 */
    @Excel(name = "消耗品，0表示不使用消耗品")
    @ApiModelProperty(value = "消耗品，0表示不使用消耗品")
    private String recordConsum;

    /** 类型 */
    @Excel(name = "类型")
    @ApiModelProperty(value = "类型")
    @NotEmpty(message = "类型不能为空")
    private String recordType;

    /** 实施方式 */
    @Excel(name = "实施方式")
    @ApiModelProperty(value = "实施方式")
    @NotEmpty(message = "实施方式不能为空")
    private String recordWay;

    /** 实施图片 */
    @Excel(name = "实施图片")
    @ApiModelProperty(value = "实施图片")
    private String recordPic;

    /** 日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "日期")
    private Date recordTime;

    /** 操作人 */
    @Excel(name = "操作人")
    @ApiModelProperty(value = "操作人")
    private String recordPerson;

    /** 操作人联系方式 */
    @Excel(name = "操作人联系方式")
    @ApiModelProperty(value = "操作人联系方式")
    private String recordPersonPhone;

    /** 产品名称 */
    @TableField(exist = false)
    private String productName;

    /** 投入品名称 */
    @ApiModelProperty(value = "投入品名称")
    private String consumableName;

    /** 投入品类型 */
    @ApiModelProperty(value = "投入品类型")
    private String consumableType;

    /** 投入品数量 */
    @ApiModelProperty(value = "投入品数量")
    private String inputNum;

    @Excel(name = "部门id")
    @ApiModelProperty(value = "部门id")
    @JsonIgnore
    private String departId;

    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }

    public void setRecordId(Long recordId) 
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }
    public void setRecordProduct(String recordProduct) 
    {
        this.recordProduct = recordProduct;
    }

    public String getRecordProduct() 
    {
        return recordProduct;
    }
    public void setRecordConsum(String recordConsum) 
    {
        this.recordConsum = recordConsum;
    }

    public String getRecordConsum() 
    {
        return recordConsum;
    }
    public void setRecordType(String recordType)
    {
        this.recordType = recordType;
    }

    public String getRecordType()
    {
        return recordType;
    }
    public void setRecordWay(String recordWay)
    {
        this.recordWay = recordWay;
    }

    public String getRecordWay()
    {
        return recordWay;
    }
    public void setRecordPic(String recordPic) 
    {
        this.recordPic = recordPic;
    }

    public String getRecordPic() 
    {
        return recordPic;
    }
    public void setRecordTime(Date recordTime) 
    {
        this.recordTime = recordTime;
    }

    public Date getRecordTime() 
    {
        return recordTime;
    }
    public void setRecordPerson(String recordPerson) 
    {
        this.recordPerson = recordPerson;
    }

    public String getRecordPerson() 
    {
        return recordPerson;
    }
    public void setRecordPersonPhone(String recordPersonPhone) 
    {
        this.recordPersonPhone = recordPersonPhone;
    }

    public String getRecordPersonPhone() 
    {
        return recordPersonPhone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("recordProduct", getRecordProduct())
            .append("recordConsum", getRecordConsum())
            .append("recordType", getRecordType())
            .append("recordWay", getRecordWay())
            .append("recordPic", getRecordPic())
            .append("recordTime", getRecordTime())
            .append("recordPerson", getRecordPerson())
            .append("recordPersonPhone", getRecordPersonPhone())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
